﻿ 
using Autofac;

namespace Repository.install
{
    public   class RepositoryModule :Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            // It was then registered with Autofac using the Populate method in ConfigureServices.
            builder.RegisterAssemblyTypes(this.ThisAssembly)
                .Where(t => t.Name.EndsWith("Repository"))
                .AsImplementedInterfaces()
                .InstancePerLifetimeScope();
        }
    }
}
